home *** CD-ROM | disk | FTP | other *** search
/ MediaClips: Full Bloom / Aris MediaClips - Full Bloom.iso / mac / Full Bloom™ / Full Bloom™ / background_2786.txt next >
Text File  |  1993-05-18  |  9KB  |  206 lines

  1. -- background: 2786 from stack: in
  2. -- bmap block id: 3710
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on showProgress wdID,wdName,objNo,objName,objValue
  8.   global pList,ifBackground,windowName,theProgress,theDialog,stackOpen,theSplash
  9.   if objValue="idle" then
  10.     if wsGet(wdName,3,Visible) = TRUE then
  11.       get wsGet(wdName,3,VALUE)
  12.       if it=0 then
  13.         set cursor to 4
  14.         wsSet wdName,3,"Value",10
  15.         wsSet theSplash,"2","TEXT","Checking Bit Depth..."
  16.       else if it=10 then
  17.         set cursor to 4
  18.         checkBitDepth
  19.         wsSet theSplash,3,"Value",20
  20.         wsSet theSplash,2,"Text","Locating files..."
  21.       else if it=20 then
  22.         set cursor to 4
  23.         wsSet theSplash,3,"Value",30
  24.         wsSet theSplash,2,"Text","Locating files... OK"
  25.         listDir
  26.       else if it=30 then
  27.         set cursor to 4
  28.         wsSet theSplash,3,"Value",40
  29.         wsSet theSplash,2,"Text","Creating menus..."
  30.         createMenu
  31.       else if it=40 then
  32.         set cursor to 4
  33.         wsSet theSplash,3,"Value",50
  34.         wsSet theSplash,2,"Text","Adding menu items..."
  35.         makeAbout
  36.       else if it=50 then
  37.         set cursor to 4
  38.         wsSet theSplash,3,"Value",60
  39.         wsSet theSplash,2,"Text","Checking sound..."
  40.         checkSnd
  41.       else if it=60 then
  42.         set cursor to 4
  43.         wsSet theSplash,3,"Value",70
  44.         get checkmark of menuitem "Sound" of menu "ArisΓäó"
  45.         wsSet theSplash,2,"Text","Checking sound..." && it
  46.         checkInfo
  47.       else if it=70 then
  48.         set cursor to 4
  49.         wsSet theSplash,3,"Value",80
  50.         wsSet theSplash,2,"Text","Creating Palette..."
  51.         createPalette
  52.       else if it=80 then
  53.         set cursor to 4
  54.         wsSet theSplash,3,"Value",90
  55.         wsSet theSplash,2,"Text","Getting first picture..."
  56.         put line 1 of pList into windowName
  57.       else if it=90 then
  58.         set cursor to 4
  59.         wsSet theSplash,3,"Value",95
  60.         wsSet theSplash,2,"Text","Getting first picture..." && windowName
  61.       else if it=95 then
  62.         set cursor to 4
  63.         wsSet theSplash,3,"Value",100
  64.       else if it=100 then
  65.         set cursor to 4
  66.         wsSend theSplash,0,"close"
  67.       end if
  68.     end if
  69.   end if
  70. end showProgress
  71. on getPreviews
  72.   -- Movie Picker window
  73.   global myRefNumber,MooVfileName,MooVList,HideAndPlay
  74.   if HideAndPlay = "" then put "Auto Close TRUE" into HideAndPlay
  75.   if there is not a window "Movie Picker" then
  76.     checkColor
  77.     put locateF() & "Data:" & discName() & ".Resources" into MooVfileName
  78.     if isFile(MooVfileName) Γëá TRUE then
  79.       put thisPath() & discName() & ".Resources" into MooVfileName
  80.     end if
  81.     if isFile(MooVfileName) and the optionKey = UP then
  82.       get windowScript("Movie Picker" & return & "i27_Name:" & HideAndPlay)
  83.       put ResourceList(MooVfileName,"PICT","Name") into MooVList
  84.       if MooVList Γëá "" and the optionKey = UP then
  85.         put resFilOpen(MooVfileName) into myRefNumber
  86.         put empty into resList1
  87.         repeat with i = 2 to 26
  88.           set cursor to busy
  89.           put "i" & i & "_Name:" & (line (i-1) of MooVList) & return after resList1
  90.         end repeat
  91.         set the properties of window "Movie Picker" to resList1
  92.       else if MooVList = empty and the optionKey = UP then
  93.         put GetDir(locateF() & "Movies:","F","o=n") into MooVList
  94.         repeat with i = 2 to 26
  95.           set cursor to busy
  96.           put "i" & i & "_Name:sm Projector" & return & "i" & (i+29) & "_Text:" & (line (i-1) of MooVList) & return & "i" & (i+29) & "_Visible:TRUE" & return after resList1
  97.         end repeat
  98.         set the properties of window "Movie Picker" to resList1
  99.       end if
  100.     else if isFile(MooVfileName) and MoovList Γëá "" and the optionKey = DOWN then
  101.       get windowScript("Movie Picker" & return & "i27_Name:" & HideAndPlay)
  102.       put GetDir(locateF() & "Movies:","F","o=n") into MooVList
  103.       repeat with i = 2 to 26
  104.         set cursor to busy
  105.         put "i" & i & "_Name:sm Projector" & return & "i" & (i+29) & "_Text:" & (line (i-1) of MooVList) & return & "i" & (i+29) & "_Visible:TRUE" & return after resList1
  106.       end repeat
  107.       set the properties of window "Movie Picker" to resList1
  108.     else if the optionKey = DOWN then
  109.       if there is a window "Movie Picker" then close window "Movie Picker"
  110.       send BuildListOfPICTs to background
  111.     else
  112.       get windowScript("Movie Picker" & return & "i27_Name:" & HideAndPlay)
  113.       put GetDir(locateF() & "Movies:","F","o=n") into MooVList
  114.       repeat with i = 2 to 26
  115.         set cursor to busy
  116.         put "i" & i & "_Name:sm Projector" & return & "i" & (i+29) & "_Text:" & (line (i-1) of MooVList) & return & "i" & (i+29) & "_Visible:TRUE" & return after resList1
  117.       end repeat
  118.       set the properties of window "Movie Picker" to resList1
  119.     end if
  120.   end if
  121. end getPreviews
  122. on BuildListOfPICTs
  123.   global targetfolder,destFileName
  124.   get FolderPath("Select a Folder that you wish to get Movie Previews from...")
  125.   put it into targetfolder
  126.   if targetfolder Γëá empty then
  127.     answer file "Please locate the" && discName() & ".Resources file to save previews into..."
  128.     put it into destFileName
  129.     if destFileName Γëá empty then
  130.       open file destfilename
  131.       close file destfilename
  132.       put changeFileType(destfilename,"rsrc","RSED") into smChange
  133.       put GetDir(targetfolder,"F","o=n") into DirList
  134.       put ChangeStr(DirList,"[44]",",","all") into DirList
  135.       repeat with i = 1 to number of lines of DirList
  136.         put "Copying preview from:" && (line i of DirList)
  137.         put ResourceList(targetfolder & (line i of DirList),"PICT","ID") into PictNo
  138.         if PictNo = "" then
  139.           PICTToClip (targetfolder & line i of DirList)
  140.           ClipToPICT destFileName,"res",(line i of DirList),(i+999),"80,60"
  141.         else
  142.           CopyRes targetfolder & (line i of DirList),destFileName,"PICT",PictNo,"I"
  143.           put last item of the result into newNum
  144.           put ResFilOpen(destfilename) into myRefNum
  145.           get (line i of DirList)
  146.           resRename "PICT",newNum,it
  147.           ResFilClose myRefNum
  148.         end if
  149.       end repeat
  150.       put empty
  151.       hide msg
  152.       answer "Movie Previews copied successfully."&return&return&"To use the Movie Picker with these resources, keep them in the same folder as this stack or in the ΓÇ£DATAΓÇ¥ folder."
  153.     else exit BuildListOfPICTs
  154.   else exit BuildListOfPICTs
  155. end BuildListOfPICTs
  156. on BuildListOfICNs
  157.   global targetfolder,destFileName
  158.   get FolderPath("Select a Folder to get icons from..."&return&"(The 24-Bit Folder looks best.)")
  159.   put it into targetfolder
  160.   if targetfolder Γëá empty then
  161.     ask file "Save icons into..." with discName() & ".Resources"
  162.     put it into destFileName
  163.     if destFileName Γëá empty then
  164.       open file destfilename
  165.       put GetDir(targetfolder,"F","o=n") into DirList
  166.       put ChangeStr(DirList,"[44]",",","all") into DirList
  167.       repeat with i = 1 to number of lines of DirList
  168.         put "Copying color icon from:" && (line i of DirList)
  169.         CopyRes targetfolder & (line i of DirList),destFileName,"ICN#","-16455","I"
  170.         put last item of the result into newNum
  171.         put ResFilOpen(destfilename) into myRefNum
  172.         get (line i of DirList)
  173.         resRename "ICN#",newNum,it
  174.         CopyRes targetfolder & (line i of DirList),destFileName,"icl8","-16455","I"
  175.         put last item of the result into newNum
  176.         get (line i of DirList)
  177.         resRename "icl8",newNum,it
  178.         ResFilClose myRefNum
  179.       end repeat
  180.       close file destfilename
  181.       put changeFileType(destfilename,"rsrc","RSED") into smChange
  182.       put empty
  183.       hide msg
  184.       answer "Color icons copied successfully."&return&return&"To use the Picture Picker with these resources, keep them in the same folder as this stack or in the ΓÇ£DATAΓÇ¥ folder."
  185.     else exit BuildListOfICNs
  186.   else exit BuildListOfICNs
  187. end BuildListOfICNs
  188. on findPICTname x
  189.   global hitPath, startChar, howFarDown, aFoundLine, lineNo, searchMe
  190.   put locateF() & "data:aris.data" into fileName
  191.   open file fileName
  192.   read from file fileName until "Γëê"
  193.   close file fileName
  194.   repeat with i = 1 to the number of lines in it
  195.     put word 1 of line i of it into item i of xTractor
  196.   end repeat
  197.   put item howFarDown of aFoundLine into lineNo
  198.   get line lineNo of searchMe
  199.   repeat with i = 1 to the number of items in xTractor
  200.     if it contains (item i of xTractor) then
  201.       put line lineNo - i + 1 to lineNo - i + 5 of searchMe into hitPath
  202.       exit repeat
  203.     end if
  204.   end repeat
  205. end findPICTname
  206.